Integrand size = 23, antiderivative size = 153 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=-\frac {(a-4 b) \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {b^{3/2} (5 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 a^3 (a+b)^{3/2} d}-\frac {b (a+2 b) \cos (c+d x)}{2 a^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a+b-b \cos ^2(c+d x)\right )} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3265, 425, 541, 536, 212, 214} \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=-\frac {b^{3/2} (5 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 a^3 d (a+b)^{3/2}}-\frac {(a-4 b) \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {b (a+2 b) \cos (c+d x)}{2 a^2 d (a+b) \left (a-b \cos ^2(c+d x)+b\right )}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a-b \cos ^2(c+d x)+b\right )} \]
[In]
[Out]
Rule 212
Rule 214
Rule 425
Rule 536
Rule 541
Rule 3265
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{d} \\ & = -\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {a-b-3 b x^2}{\left (1-x^2\right ) \left (a+b-b x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{2 a d} \\ & = -\frac {b (a+2 b) \cos (c+d x)}{2 a^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a+b-b \cos ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {-2 \left (a^2-2 a b-2 b^2\right )+2 b (a+2 b) x^2}{\left (1-x^2\right ) \left (a+b-b x^2\right )} \, dx,x,\cos (c+d x)\right )}{4 a^2 (a+b) d} \\ & = -\frac {b (a+2 b) \cos (c+d x)}{2 a^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {(a-4 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 a^3 d}-\frac {\left (b^2 (5 a+4 b)\right ) \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\cos (c+d x)\right )}{2 a^3 (a+b) d} \\ & = -\frac {(a-4 b) \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {b^{3/2} (5 a+4 b) \text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{2 a^3 (a+b)^{3/2} d}-\frac {b (a+2 b) \cos (c+d x)}{2 a^2 (a+b) d \left (a+b-b \cos ^2(c+d x)\right )}-\frac {\cot (c+d x) \csc (c+d x)}{2 a d \left (a+b-b \cos ^2(c+d x)\right )} \\ \end{align*}
Result contains complex when optimal does not.
Time = 1.65 (sec) , antiderivative size = 390, normalized size of antiderivative = 2.55 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {(-2 a-b+b \cos (2 (c+d x))) \csc ^3(c+d x) \left (\frac {8 a b^2 \cot (c+d x)}{a+b}+\frac {4 b^{3/2} (5 a+4 b) \arctan \left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right ) (2 a+b-b \cos (2 (c+d x))) \csc (c+d x)}{(-a-b)^{3/2}}+\frac {4 b^{3/2} (5 a+4 b) \arctan \left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right ) (2 a+b-b \cos (2 (c+d x))) \csc (c+d x)}{(-a-b)^{3/2}}+a (2 a+b-b \cos (2 (c+d x))) \csc ^2\left (\frac {1}{2} (c+d x)\right ) \csc (c+d x)+4 (a-4 b) (2 a+b-b \cos (2 (c+d x))) \csc (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-4 (a-4 b) (2 a+b-b \cos (2 (c+d x))) \csc (c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-a (2 a+b-b \cos (2 (c+d x))) \csc (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )}{32 a^3 d \left (b+a \csc ^2(c+d x)\right )^2} \]
[In]
[Out]
Time = 1.14 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.99
method | result | size |
derivativedivides | \(\frac {-\frac {b^{2} \left (\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (5 a +4 b \right ) \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{3}}+\frac {1}{4 a^{2} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (-a +4 b \right ) \ln \left (1+\cos \left (d x +c \right )\right )}{4 a^{3}}+\frac {1}{4 a^{2} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (a -4 b \right ) \ln \left (\cos \left (d x +c \right )-1\right )}{4 a^{3}}}{d}\) | \(152\) |
default | \(\frac {-\frac {b^{2} \left (\frac {a \cos \left (d x +c \right )}{2 \left (a +b \right ) \left (a +b -b \left (\cos ^{2}\left (d x +c \right )\right )\right )}+\frac {\left (5 a +4 b \right ) \operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) b}}\right )}{a^{3}}+\frac {1}{4 a^{2} \left (1+\cos \left (d x +c \right )\right )}+\frac {\left (-a +4 b \right ) \ln \left (1+\cos \left (d x +c \right )\right )}{4 a^{3}}+\frac {1}{4 a^{2} \left (\cos \left (d x +c \right )-1\right )}+\frac {\left (a -4 b \right ) \ln \left (\cos \left (d x +c \right )-1\right )}{4 a^{3}}}{d}\) | \(152\) |
risch | \(\frac {a b \,{\mathrm e}^{7 i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-4 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-5 a b \,{\mathrm e}^{5 i \left (d x +c \right )}-2 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-4 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}-5 a b \,{\mathrm e}^{3 i \left (d x +c \right )}-2 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+a b \,{\mathrm e}^{i \left (d x +c \right )}+2 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left (a +b \right ) \left (b \,{\mathrm e}^{4 i \left (d x +c \right )}-4 a \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d \,a^{2}}-\frac {2 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{3} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d \,a^{2}}+\frac {2 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{3} d}-\frac {5 i \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}\, {\mathrm e}^{i \left (d x +c \right )}}{b}+1\right ) b}{4 \left (a +b \right )^{2} d \,a^{2}}-\frac {i \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}\, {\mathrm e}^{i \left (d x +c \right )}}{b}+1\right )}{\left (a +b \right )^{2} d \,a^{3}}+\frac {5 i \sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}\, {\mathrm e}^{i \left (d x +c \right )}}{b}+1\right ) b}{4 \left (a +b \right )^{2} d \,a^{2}}+\frac {i \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}\, {\mathrm e}^{i \left (d x +c \right )}}{b}+1\right )}{\left (a +b \right )^{2} d \,a^{3}}\) | \(519\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 401 vs. \(2 (143) = 286\).
Time = 0.35 (sec) , antiderivative size = 838, normalized size of antiderivative = 5.48 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\left [\frac {2 \, {\left (a^{2} b + 2 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + {\left ({\left (5 \, a b^{2} + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + 5 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3} - {\left (5 \, a^{2} b + 14 \, a b^{2} + 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {\frac {b}{a + b}} \log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, {\left (a + b\right )} \sqrt {\frac {b}{a + b}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right ) - 2 \, {\left (a^{3} + 2 \, a^{2} b + 2 \, a b^{2}\right )} \cos \left (d x + c\right ) - {\left ({\left (a^{2} b - 3 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 2 \, a^{2} b - 7 \, a b^{2} - 4 \, b^{3} - {\left (a^{3} - a^{2} b - 10 \, a b^{2} - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left ({\left (a^{2} b - 3 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 2 \, a^{2} b - 7 \, a b^{2} - 4 \, b^{3} - {\left (a^{3} - a^{2} b - 10 \, a b^{2} - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left ({\left (a^{4} b + a^{3} b^{2}\right )} d \cos \left (d x + c\right )^{4} - {\left (a^{5} + 3 \, a^{4} b + 2 \, a^{3} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} d\right )}}, \frac {2 \, {\left (a^{2} b + 2 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left ({\left (5 \, a b^{2} + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + 5 \, a^{2} b + 9 \, a b^{2} + 4 \, b^{3} - {\left (5 \, a^{2} b + 14 \, a b^{2} + 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-\frac {b}{a + b}} \arctan \left (\sqrt {-\frac {b}{a + b}} \cos \left (d x + c\right )\right ) - 2 \, {\left (a^{3} + 2 \, a^{2} b + 2 \, a b^{2}\right )} \cos \left (d x + c\right ) - {\left ({\left (a^{2} b - 3 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 2 \, a^{2} b - 7 \, a b^{2} - 4 \, b^{3} - {\left (a^{3} - a^{2} b - 10 \, a b^{2} - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left ({\left (a^{2} b - 3 \, a b^{2} - 4 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 2 \, a^{2} b - 7 \, a b^{2} - 4 \, b^{3} - {\left (a^{3} - a^{2} b - 10 \, a b^{2} - 8 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left ({\left (a^{4} b + a^{3} b^{2}\right )} d \cos \left (d x + c\right )^{4} - {\left (a^{5} + 3 \, a^{4} b + 2 \, a^{3} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} d\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\int \frac {\csc ^{3}{\left (c + d x \right )}}{\left (a + b \sin ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
none
Time = 0.40 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.46 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {{\left (5 \, a b^{2} + 4 \, b^{3}\right )} \log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{4} + a^{3} b\right )} \sqrt {{\left (a + b\right )} b}} + \frac {2 \, {\left ({\left (a b + 2 \, b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + 2 \, b^{2}\right )} \cos \left (d x + c\right )\right )}}{{\left (a^{3} b + a^{2} b^{2}\right )} \cos \left (d x + c\right )^{4} + a^{4} + 2 \, a^{3} b + a^{2} b^{2} - {\left (a^{4} + 3 \, a^{3} b + 2 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2}} - \frac {{\left (a - 4 \, b\right )} \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{3}} + \frac {{\left (a - 4 \, b\right )} \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{3}}}{4 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 512 vs. \(2 (143) = 286\).
Time = 0.42 (sec) , antiderivative size = 512, normalized size of antiderivative = 3.35 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {12 \, {\left (5 \, a b^{2} + 4 \, b^{3}\right )} \arctan \left (\frac {b \cos \left (d x + c\right ) + a + b}{\sqrt {-a b - b^{2}} \cos \left (d x + c\right ) + \sqrt {-a b - b^{2}}}\right )}{{\left (a^{4} + a^{3} b\right )} \sqrt {-a b - b^{2}}} + \frac {3 \, a^{3} + 3 \, a^{2} b - \frac {8 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {12 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {28 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {7 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {16 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {16 \, b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {2 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, a^{2} b {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {8 \, a b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{{\left (a^{4} + a^{3} b\right )} {\left (\frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {2 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {4 \, b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}} + \frac {6 \, {\left (a - 4 \, b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{3}} - \frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{a^{2} {\left (\cos \left (d x + c\right ) + 1\right )}}}{24 \, d} \]
[In]
[Out]
Time = 15.46 (sec) , antiderivative size = 2338, normalized size of antiderivative = 15.28 \[ \int \frac {\csc ^3(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\text {Too large to display} \]
[In]
[Out]